#include <bits/stdc++.h>
using namespace std;
#define PI 3.1415926
#define   SQUARE(x) ((x)*(x))
//double SQUARE(double x) { return x*x;}

long long f[100]={1,1,2,3};

void w1()
{
	int a,b,n, k;
	scanf("%d",&n);
	int cnt = 0;
	a = n;
	for(int i=1; i<=n; i++){
		a = 1;
		for(int j=1; j<=i; j++){
			a *= j;
		}
		cnt += a;
	}
	printf("%d", cnt  );
}

int main()
{
	w1();
  return 0;
}
